package chapter5.eg2;

import chapter4.eg11.User;
import com.alibaba.fastjson.JSON;
import java.util.Map;
import org.apache.kafka.common.serialization.Deserializer;

public class UserDeserializer implements Deserializer<User> {

  @Override
  public void configure(Map<String, ?> configs, boolean isKey) {

  }

  @Override
  public User deserialize(String topic, byte[] data) {
    return JSON.parseObject(data, User.class);
  }

  @Override
  public void close() {

  }
}
